'\" t
.\"     Title: dstat
.\"    Author: Dag Wieers <dag@wieers.com>
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: August 2014
.\"    Manual: \ \&
.\"    Source: \ \& 0.7.3
.\"  Language: English
.\"
.TH "DSTAT" "1" "August 2014" "\ \& 0\&.7\&.3" "\ \&"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
dstat \- versatile tool for generating system resource statistics
.SH "SYNOPSIS"
.sp
dstat [\-afv] [options\&.\&.] [delay [count]]
.SH "DESCRIPTION"
.sp
Dstat is a versatile replacement for vmstat, iostat and ifstat\&. Dstat overcomes some of the limitations and adds some extra features\&.
.sp
Dstat allows you to view all of your system resources instantly, you can eg\&. compare disk usage in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval)\&.
.sp
Dstat also cleverly gives you the most detailed information in columns and clearly indicates in what magnitude and unit the output is displayed\&. Less confusion, less mistakes, more efficient\&.
.sp
Dstat is unique in letting you aggregate block device throughput for a certain diskset or network bandwidth for a group of interfaces, ie\&. you can see the throughput for all the block devices that make up a single filesystem or storage system\&.
.sp
Dstat allows its data to be directly written to a CSV file to be imported and used by OpenOffice, Gnumeric or Excel to create graphs\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.sp
Users of Sleuthkit might find Sleuthkit\(cqs dstat being renamed to datastat to avoid a name conflict\&. See Debian bug #283709 for more information\&.
.sp .5v
.RE
.SH "OPTIONS"
.PP
\-c, \-\-cpu
.RS 4
enable cpu stats (system, user, idle, wait), for more CPU related stats also see
\fB\-\-cpu\-adv\fR
and
\fB\-\-cpu\-use\fR
.RE
.PP
\-C 0,3,total
.RS 4
include cpu0, cpu3 and total (when using \-c/\-\-cpu); use
\fIall\fR
to show all CPUs
.RE
.PP
\-d, \-\-disk
.RS 4
enable disk stats (read, write), for more disk related stats look into the other
\fB\-\-disk\fR
plugins
.RE
.PP
\-D total,hda
.RS 4
include total and hda (when using \-d/\-\-disk)
.RE
.PP
\-g, \-\-page
.RS 4
enable page stats (page in, page out)
.RE
.PP
\-i, \-\-int
.RS 4
enable interrupt stats
.RE
.PP
\-I 5,10
.RS 4
include interrupt 5 and 10 (when using \-i/\-\-int)
.RE
.PP
\-l, \-\-load
.RS 4
enable load average stats (1 min, 5 mins, 15mins)
.RE
.PP
\-m, \-\-mem
.RS 4
enable memory stats (used, buffers, cache, free); for more memory related stats also try
\fB\-\-mem\-adv\fR
and
\fB\-\-swap\fR
.RE
.PP
\-n, \-\-net
.RS 4
enable network stats (receive, send)
.RE
.PP
\-N eth1,total
.RS 4
include eth1 and total (when using \-n/\-\-net)
.RE
.PP
\-p, \-\-proc
.RS 4
enable process stats (runnable, uninterruptible, new)
.RE
.PP
\-r, \-\-io
.RS 4
enable I/O request stats (read, write requests)
.RE
.PP
\-s, \-\-swap
.RS 4
enable swap stats (used, free)
.RE
.PP
\-S swap1,total
.RS 4
include swap1 and total (when using \-s/\-\-swap)
.RE
.PP
\-t, \-\-time
.RS 4
enable time/date output
.RE
.PP
\-T, \-\-epoch
.RS 4
enable time counter (seconds since epoch)
.RE
.PP
\-y, \-\-sys
.RS 4
enable system stats (interrupts, context switches)
.RE
.PP
\-\-aio
.RS 4
enable aio stats (asynchronous I/O)
.RE
.PP
\-\-cpu\-adv
.RS 4
enable advanced cpu stats
.RE
.PP
\-\-cpu\-use
.RS 4
enable only cpu usage stats
.RE
.PP
\-\-fs, \-\-filesystem
.RS 4
enable filesystem stats (open files, inodes)
.RE
.PP
\-\-ipc
.RS 4
enable ipc stats (message queue, semaphores, shared memory)
.RE
.PP
\-\-lock
.RS 4
enable file lock stats (posix, flock, read, write)
.RE
.PP
\-\-mem\-adv
.RS 4
enable advanced memory stats
.RE
.PP
\-\-raw
.RS 4
enable raw stats (raw sockets)
.RE
.PP
\-\-socket
.RS 4
enable socket stats (total, tcp, udp, raw, ip\-fragments)
.RE
.PP
\-\-tcp
.RS 4
enable tcp stats (listen, established, syn, time_wait, close)
.RE
.PP
\-\-udp
.RS 4
enable udp stats (listen, active)
.RE
.PP
\-\-unix
.RS 4
enable unix stats (datagram, stream, listen, active)
.RE
.PP
\-\-vm
.RS 4
enable vm stats (hard pagefaults, soft pagefaults, allocated, free)
.RE
.PP
\-\-vm\-adv
.RS 4
enable advance vm stats (steal, scanK, scanD, pgoru, astll)
.RE
.PP
\-\-zones
.RS 4
enable zoneinfo stats (d32F, d32H, normF, normH)
.RE
.PP
\-\-plugin\-name
.RS 4
enable (external) plugins by plugin name, see
\fBPLUGINS\fR
for options
.RE
.PP
Possible internal stats are
.RS 4
aio, cpu, cpu24, cpu\-adv, cpu\-use, disk, disk24, disk24\-old, epoch, fs, int, int24, io, ipc, load, lock, mem, mem\-adv, net, page, page24, proc, raw, socket, swap, swap\-old, sys, tcp, time, udp, unix, vm, vm\-adv, zones
.RE
.PP
\-\-list
.RS 4
list the internal and external plugin names
.RE
.PP
\-a, \-\-all
.RS 4
equals \-cdngy (default)
.RE
.PP
\-f, \-\-full
.RS 4
expand \-C, \-D, \-I, \-N and \-S discovery lists
.RE
.PP
\-v, \-\-vmstat
.RS 4
equals \-pmgdsc \-D total
.RE
.PP
\-\-bits
.RS 4
force bits for values expressed in bytes
.RE
.PP
\-\-float
.RS 4
force float values on screen (mutual exclusive with
\fB\-\-integer\fR)
.RE
.PP
\-\-integer
.RS 4
force integer values on screen (mutual exclusive with
\fB\-\-float\fR)
.RE
.PP
\-\-bw, \-\-blackonwhite
.RS 4
change colors for white background terminal
.RE
.PP
\-\-nocolor
.RS 4
disable colors
.RE
.PP
\-\-noheaders
.RS 4
disable repetitive headers
.RE
.PP
\-\-noupdate
.RS 4
disable intermediate updates when delay > 1
.RE
.PP
\-\-output file
.RS 4
write CSV output to file
.RE
.PP
\-\-profile
.RS 4
show profiling statistics when exiting dstat
.RE
.SH "PLUGINS"
.sp
While anyone can create their own dstat plugins (and contribute them) dstat ships with a number of plugins already that extend its capabilities greatly\&. Here is an overview of the plugins dstat ships with:
.PP
\-\-battery
.RS 4
battery in percentage (needs ACPI)
.RE
.PP
\-\-battery\-remain
.RS 4
battery remaining in hours, minutes (needs ACPI)
.RE
.PP
\-\-cpufreq
.RS 4
CPU frequency in percentage (needs ACPI)
.RE
.PP
\-\-dbus
.RS 4
number of dbus connections (needs python\-dbus)
.RE
.PP
\-\-disk\-avgqu
.RS 4
average queue length of the requests that were issued to the device
.RE
.PP
\-\-disk\-avgrq
.RS 4
average size (in sectors) of the requests that were issued to the device
.RE
.PP
\-\-disk\-svctm
.RS 4
average service time (in milliseconds) for I/O requests that were issued to the device
.RE
.PP
\-\-disk\-tps
.RS 4
number of transfers per second that were issued to the device
.RE
.PP
\-\-disk\-util
.RS 4
percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device)
.RE
.PP
\-\-disk\-wait
.RS 4
average time (in milliseconds) for I/O requests issued to the device to be served
.RE
.PP
\-\-dstat
.RS 4
show dstat cputime consumption and latency
.RE
.PP
\-\-dstat\-cpu
.RS 4
show dstat advanced cpu usage
.RE
.PP
\-\-dstat\-ctxt
.RS 4
show dstat context switches
.RE
.PP
\-\-dstat\-mem
.RS 4
show dstat advanced memory usage
.RE
.PP
\-\-fan
.RS 4
fan speed (needs ACPI)
.RE
.PP
\-\-freespace
.RS 4
per filesystem disk usage
.RE
.PP
\-\-gpfs
.RS 4
GPFS read/write I/O (needs mmpmon)
.RE
.PP
\-\-gpfs\-ops
.RS 4
GPFS filesystem operations (needs mmpmon)
.RE
.PP
\-\-helloworld
.RS 4
Hello world example dstat plugin
.RE
.PP
\-\-innodb\-buffer
.RS 4
show innodb buffer stats
.RE
.PP
\-\-innodb\-io
.RS 4
show innodb I/O stats
.RE
.PP
\-\-innodb\-ops
.RS 4
show innodb operations counters
.RE
.PP
\-\-lustre
.RS 4
show lustre I/O throughput
.RE
.PP
\-\-md\-status
.RS 4
show software raid (md) progress and speed
.RE
.PP
\-\-memcache\-hits
.RS 4
show the number of hits and misses from memcache
.RE
.PP
\-\-mysql5\-cmds
.RS 4
show the MySQL5 command stats
.RE
.PP
\-\-mysql5\-conn
.RS 4
show the MySQL5 connection stats
.RE
.PP
\-\-mysql5\-innodb
.RS 4
show the MySQL5 innodb stats
.RE
.PP
\-\-mysql5\-io
.RS 4
show the MySQL5 I/O stats
.RE
.PP
\-\-mysql5\-keys
.RS 4
show the MySQL5 keys stats
.RE
.PP
\-\-mysql\-io
.RS 4
show the MySQL I/O stats
.RE
.PP
\-\-mysql\-keys
.RS 4
show the MySQL keys stats
.RE
.PP
\-\-net\-packets
.RS 4
show the number of packets received and transmitted
.RE
.PP
\-\-nfs3
.RS 4
show NFS v3 client operations
.RE
.PP
\-\-nfs3\-ops
.RS 4
show extended NFS v3 client operations
.RE
.PP
\-\-nfsd3
.RS 4
show NFS v3 server operations
.RE
.PP
\-\-nfsd3\-ops
.RS 4
show extended NFS v3 server operations
.RE
.PP
\-\-nfsd4\-ops
.RS 4
show extended NFS v4 server operations
.RE
.PP
\-\-nfsstat4
.RS 4
show NFS v4 stats
.RE
.PP
\-\-ntp
.RS 4
show NTP time from an NTP server
.RE
.PP
\-\-postfix
.RS 4
show postfix queue sizes (needs postfix)
.RE
.PP
\-\-power
.RS 4
show power usage
.RE
.PP
\-\-proc\-count
.RS 4
show total number of processes
.RE
.PP
\-\-qmail
.RS 4
show qmail queue sizes (needs qmail)
.RE
.sp
\-\-redis: show redis stats
.PP
\-\-rpc
.RS 4
show RPC client calls stats
.RE
.PP
\-\-rpcd
.RS 4
show RPC server calls stats
.RE
.PP
\-\-sendmail
.RS 4
show sendmail queue size (needs sendmail)
.RE
.PP
\-\-snmp\-cpu
.RS 4
show CPU stats using SNMP from DSTAT_SNMPSERVER
.RE
.PP
\-\-snmp\-load
.RS 4
show load stats using SNMP from DSTAT_SNMPSERVER
.RE
.PP
\-\-snmp\-mem
.RS 4
show memory stats using SNMP from DSTAT_SNMPSERVER
.RE
.PP
\-\-snmp\-net
.RS 4
show network stats using SNMP from DSTAT_SNMPSERVER
.RE
.sp
\-\-snmp\-net\-err: show network errors using SNMP from DSTAT_SNMPSERVER
.PP
\-\-snmp\-sys
.RS 4
show system stats (interrupts and context switches) using SNMP from DSTAT_SNMPSERVER
.RE
.PP
\-\-snooze
.RS 4
show number of ticks per second
.RE
.PP
\-\-squid
.RS 4
show squid usage statistics
.RE
.PP
\-\-test
.RS 4
show test plugin output
.RE
.PP
\-\-thermal
.RS 4
system temperature sensors
.RE
.PP
\-\-top\-bio
.RS 4
show most expensive block I/O process
.RE
.PP
\-\-top\-bio\-adv
.RS 4
show most expensive block I/O process (incl\&. pid and other stats)
.RE
.PP
\-\-top\-childwait
.RS 4
show process waiting for child the most
.RE
.PP
\-\-top\-cpu
.RS 4
show most expensive CPU process
.RE
.PP
\-\-top\-cpu\-adv
.RS 4
show most expensive CPU process (incl\&. pid and other stats)
.RE
.PP
\-\-top\-cputime
.RS 4
show process using the most CPU time (in ms)
.RE
.PP
\-\-top\-cputime\-avg
.RS 4
show process with the highest average timeslice (in ms)
.RE
.PP
\-\-top\-int
.RS 4
show most frequent interrupt
.RE
.PP
\-\-top\-io
.RS 4
show most expensive I/O process
.RE
.PP
\-\-top\-io\-adv
.RS 4
show most expensive I/O process (incl\&. pid and other stats)
.RE
.PP
\-\-top\-latency
.RS 4
show process with highest total latency (in ms)
.RE
.PP
\-\-top\-latency\-avg
.RS 4
show process with the highest average latency (in ms)
.RE
.PP
\-\-top\-mem
.RS 4
show process using the most memory
.RE
.PP
\-\-top\-oom
.RS 4
show process that will be killed by OOM the first
.RE
.PP
\-\-utmp
.RS 4
show number of utmp connections (needs python\-utmp)
.RE
.PP
\-\-vm\-cpu
.RS 4
show VMware CPU stats from hypervisor
.RE
.PP
\-\-vm\-mem
.RS 4
show VMware memory stats from hypervisor
.RE
.PP
\-\-vm\-mem\-adv
.RS 4
show advanced VMware memory stats from hypervisor
.RE
.PP
\-\-vmk\-hba
.RS 4
show VMware ESX kernel vmhba stats
.RE
.PP
\-\-vmk\-int
.RS 4
show VMware ESX kernel interrupt stats
.RE
.PP
\-\-vmk\-nic
.RS 4
show VMware ESX kernel port stats
.RE
.PP
\-\-vz\-cpu
.RS 4
show CPU usage per OpenVZ guest
.RE
.PP
\-\-vz\-io
.RS 4
show I/O usage per OpenVZ guest
.RE
.PP
\-\-vz\-ubc
.RS 4
show OpenVZ user beancounters
.RE
.PP
\-\-wifi
.RS 4
wireless link quality and signal to noise ratio
.RE
.PP
\-\-zfs\-arc
.RS 4
show ZFS arc stats
.RE
.PP
\-\-zfs\-l2arc
.RS 4
show ZFS l2arc stats
.RE
.PP
\-\-zfs\-zil
.RS 4
show ZFS zil stats
.RE
.SH "ARGUMENTS"
.sp
\fBdelay\fR is the delay in seconds between each update
.sp
\fBcount\fR is the number of updates to display before exiting
.sp
The default delay is 1 and count is unspecified (unlimited)
.SH "INTERMEDIATE UPDATES"
.sp
When invoking dstat with a \fBdelay\fR greater than 1 and without the \fB\-\-noupdate\fR option, it will show intermediate updates, ie\&. the first time a 1 sec average, the second update a 2 second average, etc\&. until the delay has been reached\&.
.sp
So in case you specified a delay of 10, \fBthe 9 intermediate updates are NOT snapshots\fR, they are averages over the time that passed since the last final update\&. The end result is that you get a 10 second average on a new line, just like with vmstat\&.
.SH "EXAMPLES"
.sp
Using dstat to relate disk\-throughput with network\-usage (eth0), total CPU\-usage and system counters:
.sp
.if n \{\
.RS 4
.\}
.nf
dstat \-dnyc \-N eth0 \-C total \-f 5
.fi
.if n \{\
.RE
.\}
.sp
Checking dstat\(cqs behaviour and the system impact of dstat:
.sp
.if n \{\
.RS 4
.\}
.nf
dstat \-taf \-\-debug
.fi
.if n \{\
.RE
.\}
.sp
Using the time plugin together with cpu, net, disk, system, load, proc and top_cpu plugins:
.sp
.if n \{\
.RS 4
.\}
.nf
dstat \-tcndylp \-\-top\-cpu
.fi
.if n \{\
.RE
.\}
.sp
this is identical to
.sp
.if n \{\
.RS 4
.\}
.nf
dstat \-\-time \-\-cpu \-\-net \-\-disk \-\-sys \-\-load \-\-proc \-\-top\-cpu
.fi
.if n \{\
.RE
.\}
.sp
Using dstat to relate advanced cpu stats with interrupts per device:
.sp
.if n \{\
.RS 4
.\}
.nf
dstat \-t \-\-cpu\-adv \-yif
.fi
.if n \{\
.RE
.\}
.SH "BUGS"
.sp
Since it is practically impossible to test dstat on every possible permutation of kernel, python or distribution version, I need your help and your feedback to fix the remaining problems\&. If you have improvements or bugreports, please send them to: \m[blue]\fBdag@wieers\&.com\fR\m[]\&\s-2\u[1]\d\s+2
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.sp
Please see the TODO file for known bugs and future plans\&.
.sp .5v
.RE
.SH "FILES"
.sp
Paths that may contain external dstat_*\&.py plugins:
.sp
.if n \{\
.RS 4
.\}
.nf
~/\&.dstat/
(path of binary)/plugins/
/usr/share/dstat/
/usr/local/share/dstat/
.fi
.if n \{\
.RE
.\}
.SH "ENVIRONMENT VARIABLES"
.sp
Dstat will read additional command line arguments from the environment variable \fBDSTAT_OPTS\fR\&. You can use this to configure Dstat\(cqs default behavior, e\&.g\&. if you have a black\-on\-white terminal:
.sp
.if n \{\
.RS 4
.\}
.nf
export DSTAT_OPTS="\-\-bw \-\-noupdate"
.fi
.if n \{\
.RE
.\}
.sp
Other internal or external plugins have their own environment variables to influence their behavior, e\&.g\&.
.sp
.if n \{\
.RS 4
.\}
.nf
DSTAT_NTPSERVER
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
DSTAT_MYSQL
DSTAT_MYSQL_HOST
DSTAT_MYSQL_PORT
DSTAT_MYSQL_SOCKET
DSTAT_MYSQL_USER
DSTAT_MYSQL_PWD
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
DSTAT_SNMPSERVER
DSTAT_SNMPCOMMUNITY
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
DSTAT_SQUID_OPTS
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
DSTAT_TIMEFMT
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.SS "Performance tools"
.sp
.if n \{\
.RS 4
.\}
.nf
htop(1), ifstat(1), iftop(8), iostat(1), mpstat(1), netstat(8), nfsstat(8), perf(1), powertop(1), rtacct(8), top(1), vmstat(8), xosview(1)
.fi
.if n \{\
.RE
.\}
.SS "Process tracing"
.sp
.if n \{\
.RS 4
.\}
.nf
lslk(8), lsof(8), ltrace(1), pidstat(1), pmap(1), ps(1), pstack(1), strace(1)
.fi
.if n \{\
.RE
.\}
.SS "Binary debugging"
.sp
.if n \{\
.RS 4
.\}
.nf
ldd(1), file(1), nm(1), objdump(1), readelf(1)
.fi
.if n \{\
.RE
.\}
.SS "Memory usage tools"
.sp
.if n \{\
.RS 4
.\}
.nf
free(1), memusage, memusagestat, ps_mem(1), slabtop(1), smem(8)
.fi
.if n \{\
.RE
.\}
.SS "Accounting tools"
.sp
.if n \{\
.RS 4
.\}
.nf
acct(2), dump\-acct(8), dump\-utmp(8), lastcomm(1), sa(8)
.fi
.if n \{\
.RE
.\}
.SS "Hardware debugging tools"
.sp
.if n \{\
.RS 4
.\}
.nf
dmidecode(8), ifinfo(1), lsdev(1), lshal(1), lshw(1), lsmod(8), lspci(8), lsusb(8), numactl(8), smartctl(8), turbostat(8), x86info(1)
.fi
.if n \{\
.RE
.\}
.SS "Application debugging"
.sp
.if n \{\
.RS 4
.\}
.nf
mailstats(8), qshape(1)
.fi
.if n \{\
.RE
.\}
.SS "Xorg related tools"
.sp
.if n \{\
.RS 4
.\}
.nf
xdpyinfo(1), xrestop(1)
.fi
.if n \{\
.RE
.\}
.SS "Other useful info"
.sp
.if n \{\
.RS 4
.\}
.nf
collectl(1), proc(5), procinfo(8)
.fi
.if n \{\
.RE
.\}
.SH "AUTHOR"
.sp
Written by Dag Wieers \m[blue]\fBdag@wieers\&.com\fR\m[]\&\s-2\u[1]\d\s+2
.sp
Homepage at \m[blue]\fBhttp://dag\&.wieers\&.com/home\-made/dstat/\fR\m[]
.sp
This manpage was initially written by Andrew Pollock \m[blue]\fBapollock@debian\&.org\fR\m[]\&\s-2\u[2]\d\s+2 for the Debian GNU/Linux system\&.
.SH "AUTHOR"
.PP
\fBDag Wieers\fR <\&dag@wieers\&.com\&>
.RS 4
Author.
.RE
.SH "NOTES"
.IP " 1." 4
dag@wieers.com
.RS 4
\%mailto:dag@wieers.com
.RE
.IP " 2." 4
apollock@debian.org
.RS 4
\%mailto:apollock@debian.org
.RE
